# $Id: PKGBUILD 90053 2013-05-06 19:38:05Z foutrelis $
# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>
# Maintainer : SpepS <dreamspepser at yahoo dot it>
# Contributor: Auguste <auguste@gmail.com>
# Contributor: Jose Negron <josenj.arch@mailnull.com>

pkgname=libharu
pkgver=2.2.1
pkgrel=4
pkgdesc="C/C++ library for generating PDF documents"
url="http://libharu.org/wiki/Main_Page"
arch=('i686' 'x86_64')
license=('custom:ZLIB')
depends=('libpng' 'gcc-libs')
options=(!libtool)
source=("http://libharu.org/files/$pkgname-$pkgver.tar.gz"
	libpng15.patch)
md5sums=('63da8e087744f1d6cf16f9501b1cb766'
         '01ead345fba55e6374fe2dbf9be0db3e')

build() {
  cd "$srcdir/$pkgname-$pkgver"
  patch -p1 <$srcdir/libpng15.patch
  ./configure --prefix=/usr
  make
}

package() {
  cd "$srcdir/$pkgname-$pkgver"
  make DESTDIR="$pkgdir/" install
  # license
  install -d "$pkgdir/usr/share/licenses/$pkgname"
  sed -n '102,120p' README > "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}
